<?php
namespace ImiApp\ApiServer\Controller;

use Imi\Controller\HttpController;
use Imi\Server\Route\Annotation\Action;
use Imi\Server\Route\Annotation\Controller;

/**
 * @Controller("/exception/")
 */
class ExceptionController extends HttpController
{
    /**
     * @Action
     *
     * @return void
     */
    public function error()
    {
        trigger_error('I am an error', E_USER_ERROR);
    }

    /**
     * @Action
     *
     * @return void
     */
    public function exception()
    {
        throw new \Exception('I am an exception');
    }

}
